public class Monster
{
    private int strengh;
    private int ATK;
    private int DEF;
    private String name;
    private String race;
    private Player player;
    public Monster(int steps)
    {
        this.ATK=(int)(Math.random()*steps*2+5);
        this.DEF=(int)(Math.random()*steps*2+5);
        this.strengh=(int)(Math.random()*60+30);
        this.name = randomName(steps);
    }
    
    public Monster(String name,int steps)
    {
        this.ATK=(int)(Math.random()*steps*4+20);
        this.DEF=(int)(Math.random()*steps*4+10);
        this.strengh = 100;
        this.name = name;
    }
    public void show()
    {
       System.out.println("遇到了"+this.name);
       System.out.println("攻击力:"+this.ATK);
       System.out.println("防御力:"+this.DEF);
       System.out.println("血量:"+this.strengh);
    }
    
    public int getStrengh()
    {
        return this.strengh;
    }
    public String getName()
    {
        return this.name;
    }
    public void setStrengh(int hurt)
    {
        this.strengh+=hurt;
    }
    
    public int getATK()
    {
        return this.ATK;
    }
    public int getDEF()
    {
        return this.DEF;
    }
    
    public String getRace()
    {
        return this.race;
    }
    
    public String randomName(int steps)
    {
        String name="";
        if(steps<10)
        {
            name+="新手";
        }
        else if(steps<20)
        {
            name+="骑士";
        }
        else if(steps<30)
        {
            name+="加强版";
        }
        int ran = (int)(Math.random()*100);
        if(ran<25)
        {
            name+="平民";
            race="平民";
            this.ATK--;
            this.DEF--;
        }
        else if(ran<50)
        {
            name+="无头僵尸";
            race="无头僵尸";
            this.ATK+=5;
            this.DEF-=3;
        }
        else if(ran<75)
        {
            name+="铁甲僵尸";
            race="铁甲僵尸";
            this.ATK++;
            this.DEF+=3;
        }
        else
        {
            name+="大头僵尸";
            race="大头僵尸";
            this.ATK+=3;
            this.DEF+=3;
        }
        return name;
    }
}